package com.yy.entity;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Result {
    private String message;
    private Object data;
    private Integer code;

    public Result success(Object data){
        return new Result("success",data,0);
    }
    public Result error(){
        return new Result("error",null,1);
    }
}
